package edu.kjxy.day02.daemonThread;

/**
 * 功能:守护线程
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 16:07
 */
public class MyThread extends Thread{
    private int i = 0;

    @Override
    public void run() {
        try {
            while (true){
                i++;
                System.out.println("i=" + i);
                Thread.sleep(1000);
            }
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
